<!DOCTYPE html>
<html>
<#include "../head.html">
    <body class="full">
    <div class="mc">
        <div>
            <div class="mc-l">
                <!--左侧导航---{-->
                <div id="navPanelContainer">
                    <div class="system-logo cd"></div>
                    <!--管理员信息---{-->
                    <#include "../adminInfo.html">
                        <!--管理员信息---}-->
                        <div class="nav-wrap">
                           <#include "../operate/left.html">
                        </div>
                </div>
                <!--左侧导航---}-->
            </div>
            <div class="mc-m">
                <div class="navToggle"></div>
            </div>
            <div class="mc-r">
                <!--顶部导航---{-->
                <#include "../topNav.html">
                    <!--顶部导航---}-->

                    <!--面包屑导航---{-->
                    <#assign moduleName="准备金充值记录">
                        <#include "../operate/banner.html">
                            <!--面包屑导航---}-->

                            <!--工具栏--{-->
                            <div id="toolbar" class="clearfix">
                                <div class="s_toolTop">
                                    <div class="toolbor-module export">
                                        <input type="button" onclick="exportxls()" value="导出列表" class="input-button export-btn"/>
                                    </div>
                                    <div class="toolbor-module export">
                                        &nbsp;&nbsp;&nbsp;充值人数：${rechargeUserCnt?c}<br/>
                                        &nbsp;&nbsp;&nbsp;充值笔数：${rechargeCnt?c}<br/>
                                        &nbsp;&nbsp;&nbsp;充值总金额：${rechargeSum?c}元 <br/>
                                        &nbsp;&nbsp;&nbsp;手续费总金额：${poundageSum?c}元
                                    </div>
                                </div>
                                <div class="s_toolTop">
                                    <div class="toolbor-module export">
                                        <div class="formTit">充值时间：</div>
                                        <input class="_search-value" name="startDate" id="startDate" value="" onclick="change_picktime()"/>
                                        <div class="formTit"> 到 </div>
                                        <input class="_search-value" name="endDate" id="endDate" value=""  onclick="change_picktime()"/>
                                    </div>
                                    <div class="toolbor-module export">
                                        <div class="formTit">订单号：</div>
                                        <input type="text" name="tradeno" id="tradeno" value="请输入订单号" class="search-value">
                                        <div class="formTit">用户名：</div>
                                        <input type="text" name="username" id="username" value="请输入用户名" class="search-value">
                                        <div class="formTit">手机号码：</div>
                                        <input type="text" name="phone" id="phone" value="请输入手机号码" class="search-value">
                                        <div class="formTit">渠道来源：</div>
                                        <input type="text" name="sourcefrom" id="sourcefrom" value="请输入渠道来源" class="search-value">
                                    </div>
                                    <div class="toolbor-module export">
                                        <div class="formTit">状态：</div>
                                        <div class="select-box" id="status">
                                            <div class="tag-select">全部</div>
                                            <ul class="tag-options">
                                                <li data-value="">全  部</li>
                                                <li data-value="200">成功</li>
                                                <li data-value="299">失败</li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                                <div class="s_toolTop">
                                    <div class="toolbor-module search">
                                        <input type="button" value="搜索"  class="input-button" onclick="sousuo();">
                                    </div>
                                </div>
                            </div>
                            <!--工具栏--}-->

                            <div id="main" class="clearfix">
                                <form action="" method="post">
                                    <table class="data-list">
                                        <tr class="header">
                                            <td>ID</td>
                                            <td>订单号</td>
                                            <td>用户名</td>
                                            <td>用户手机</td>
                                            <td>真实姓名</td>
                                            <td>充值金额</td>
                                            <td>渠道来源</td>
                                            <td>充值时间</td>                            
                                            <td>状态</td>
                                        </tr>
                                        <#list list as item>
                                            <tr class="s">
                                                <td>${item[0]!c}</td>
                                                <td><#if item[1]??>${item[1]}</#if></td>
												<td>${item[2]}</td>
                                                <td>${item[3]}</td>
                                                <td>${item[4]}</td>
                                                <td>${item[5]?c}元</td>
                                                <td><#if item[6]??>${item[6]}</#if></td>
                                                <td>${item[7]}</td>
                                                <td><#if item[8]==200><font style="color: green;">成功</font><#elseif item[8]==299><font style="color: red;">失败</font><#else>处理中</#if></td>
                                            </tr>
                                            </#list>
                                    </table>
                                </form>

                                <!--底部工具栏--{-->
                                <div id="bottomToolbar" class="clearfix">
                                    <div class="other-tool">
                                        <dl class="refresh-data">
                                            <dt class="refresh-data-icon"></dt>
                                            <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                                        </dl>
                                    </div>

                                    <!--翻页系统--{-->
                                    <div class="container s_formPage">
                                        <#import "../../common/page.html" as pager>
                                            <@pager.pagination page=page url="${pageUrl}" map=param style="style1"  />
                                    </div>
                                    <!--翻页系统--}-->
                                </div>
                                <!--底部工具栏--}-->

                                 <script>
                                    var url = 'rechargeRecord.html?search=true';
                                    var xlsurl='rechargeRecord.html?type=export';
                                    function sousuo(){
                                    	 var sou = "";
                                         var username = $("#username").val();
                                         if (username!=null&&username!=""&&username!="undefine"&&username!="请输入用户名"){
                                             sou += "&username="+username;
                                         }
                                     	 var tradeno = $("#tradeno").val();
                     					 if(tradeno!=""&&tradeno!="请输入订单号"){
                     						sou += "&tradeno="+tradeno;
                     					 }
                                       	 var phone = $("#phone").val();
                     					 if(phone!=""&&phone!="请输入手机号码"){
                     						sou += "&phone="+phone;
                     					 }
                                     	 var sourcefrom = $("#sourcefrom").val();
                     					 if(sourcefrom!=""&&sourcefrom!="请输入渠道来源"){
                     						sou += "&sourcefrom="+sourcefrom;
                     					 }
                     					 
                    					 var startDate = $("#startDate").val();
                                         var endDate = $("#endDate").val();
                                         if (startDate!=null){
                                            sou += "&startDate="+startDate;
                                         }
                                         if (endDate!=null){
                                            sou += "&endDate="+endDate;
                                         }
                                         
                                         var status = $("#status").find(".open-selected").attr("data-value");
                                         if(status!=null&&status!=""&&status!="undefine"){
                                         	sou += "&status="+status;
                                         }
                                
                                         if (sou!=""){
                                             location.href=url+sou;
                                         }
                                    }
                                    
                                    function exportxls(){
											var num='${(page.total)?c}'; 
                        				num=num.replace(",",""); 
                        				if(num>30000){ //条数自己定义，但必须小于65536 
                        					alert("数据过多，请选择指定的时间进行数据查询导出！"); //提示信息根据不同的内容注意修改下。 
                        					return false; 
                        				}
                                   	 var sou = "";
                                        var username = $("#username").val();
                                        if (username!=null&&username!=""&&username!="undefine"&&username!="请输入用户名"){
                                            sou += "&username="+username;
                                        }
                                    	 var tradeno = $("#tradeno").val();
                    					 if(tradeno!=""&&tradeno!="请输入订单号"){
                    						sou += "&tradeno="+tradeno;
                    					 }
                                      	 var phone = $("#phone").val();
                    					 if(phone!=""&&phone!="请输入手机号码"){
                    						sou += "&phone="+phone;
                    					 }
                                    	 var sourcefrom = $("#sourcefrom").val();
                    					 if(sourcefrom!=""&&sourcefrom!="请输入渠道来源"){
                    						sou += "&sourcefrom="+sourcefrom;
                    					 }
                    					 
                   					 var startDate = $("#startDate").val();
                                        var endDate = $("#endDate").val();
                                        if (startDate!=null){
                                           sou += "&startDate="+startDate;
                                        }
                                        if (endDate!=null){
                                           sou += "&endDate="+endDate;
                                        }
                                        
                                        var status = $("#status").find(".open-selected").attr("data-value");
                                        if(status!=null&&status!=""&&status!="undefine"){
                                        	sou += "&status="+status;
                                        }
                               
                                        if (sou!=""){
                                            location.href=xlsurl+sou;
                                        } else{
                                            location.href=xlsurl;
                                        }
                                   }
                                
                                </script>
                            </div>

            </div>
        </div>
        <div>
            <!--尾部--{-->
            <td colspan="3" class="mc-b"><#include "../foot.html"></td>
            <!--尾部--}-->
        </div>
    </div>

    </body>
</html>
<#include "../jsPage.html">
